//导入request.js请求工具
import request from '@/utils/request.js'


//添加
export const batchAddService = (batchData) => {
    return request.post('/batch', batchData);
}

//删除
export const delBatchService = (batchId) => {
    return request.delete('/batch/' + batchId)
}

//查询
export const batchListService = (params) => {
    return request.get('/batch', {params: params})
}

//查询/入库用
export const batchListwarehous = (params) => {
    return request.get('/batch/warehous', {params: params})
}

//查询所有
export const batchAllService = () => {
    return request.get('/batch/all');
}

//查询可申请批次
export const batchUseableService = () => {
    return request.get('/batch/useable');
}

//更新
export const batchUpdateService = (batchData) => {
    return request.put('/batch', batchData);
}

//变io
export const batchChangeService = (id) => {
    return request.put('/batch/changeIO?id=' + id)
}